Trò chơi đua xe động vật trong UNITY Engine
114.827 lượt xem;
- Label.cs
- ShopScreen /
- AnimalRacing /
- Scripts /
- Assets /
- project /
1 using UnityEngine;
2 using System.Collections;
3
4 public class Label : MonoBehaviour {
5
6 private BitmapFont shopFont;
7
8 public void setFont(BitmapFont shopFont)
9 {
10 this.shopFont = new BitmapFont(shopFont, gameObject);
11 }
12
13 public void setText(string text, float kerning, float space)
14 {
15 shopFont.setText(text, kerning, space, "GUI", "GUI");
16 }
17
18 }
2 using System.Collections;
3
4 public class Label : MonoBehaviour {
5
6 private BitmapFont shopFont;
7
8 public void setFont(BitmapFont shopFont)
9 {
10 this.shopFont = new BitmapFont(shopFont, gameObject);
11 }
12
13 public void setText(string text, float kerning, float space)
14 {
15 shopFont.setText(text, kerning, space, "GUI", "GUI");
16 }
17
18 }